Skip to content

Conversation

@szabgab
Copy link

@szabgab szabgab commented Jan 29, 2026

Why:

Those hashes were very old and in general it recommended (by other parts of the GitHub documentation) that people use tags to specify version of actions.

What's being changed (if available, include any code snippets, screenshots, or gifs):

The versions used in the example.

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Copilot AI review requested due to automatic review settings January 29, 2026 11:24
@github-actions
Copy link
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/tutorials/publish-packages/publish-docker-images.md fpt
ghec
ghes@ 3.19 3.18 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.19 3.18 3.17 3.16 3.15 3.14

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jan 29, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Docker action references in a tutorial documentation file from commit SHA hashes to version tags (v3, v5, v6) for the docker/login-action, docker/metadata-action, and docker/build-push-action respectively. The stated reason is that "other parts of the GitHub documentation" recommend using tags instead of hashes.

Changes:

  • Updated docker/login-action references from SHA hash to @V3
  • Updated docker/metadata-action reference from SHA hash to @v5
  • Updated docker/build-push-action reference from SHA hash to @v6

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +199 to +221
uses: docker/login-action@v3
with:
username: {% raw %}${{ secrets.DOCKER_USERNAME }}{% endraw %}
password: {% raw %}${{ secrets.DOCKER_PASSWORD }}{% endraw %}

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: {% ifversion fpt or ghec %}ghcr.io{% elsif ghes %}{% data reusables.package_registry.container-registry-hostname %}{% endif %}
username: {% raw %}${{ github.actor }}{% endraw %}
password: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5
with:
images: |
my-docker-hub-namespace/my-docker-hub-repository
{% data reusables.package_registry.container-registry-hostname %}/{% raw %}${{ github.repository }}{% endraw %}
- name: Build and push Docker images
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@v6
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this PR only update the third example workflow (lines 199-221) to use version tags, but the first example workflow in this file (lines 97, 104, 110) still uses SHA commit hashes for the same Docker actions. This creates an inconsistency within the same documentation file.

For consistency with the changes being made here, the first example should also be updated from:

Additionally, both examples include a reusable comment stating "GitHub recommends pinning actions to a commit SHA" which directly contradicts the purpose of this PR. If the recommendation has changed to use tags instead of SHAs, this reusable comment should be updated or removed from these examples.

Copilot uses AI. Check for mistakes.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow examples in this file include a reusable comment stating "GitHub recommends pinning actions to a commit SHA" (via the actions-use-sha-pinning-comment reusable). This directly contradicts the changes being made in this PR, which replace commit SHA pins with version tags.

According to the security documentation at content/actions/reference/security/secure-use.md lines 138-160, pinning to a full-length commit SHA is the most secure option and is recommended for third-party actions. The PR description states that tags are recommended "by other parts of the GitHub documentation," but this appears to conflict with the security best practices documented in the codebase.

If the intent is to use tags instead of SHAs in these examples (perhaps for simplicity or readability in tutorial content), the reusable comment should be removed from these workflow examples to avoid giving contradictory guidance to users.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant